#pragma once
#include "stdlib.h"

////////////////////////////////////////////////////////////////////////////////////////
/// Class to encapsulate unique frame identifier
////////////////////////////////////////////////////////////////////////////////////////
class FrameKey
{
protected:
	static int _globalKeyIndex;
	int _keyIndex;

	FrameKey()
	{
	}

public:

	bool Equal(FrameKey* key)
	{
		return _keyIndex == key->_keyIndex;
	}

	char* ToString()
	{
		char buff[100];
		itoa(_keyIndex, buff, 10);
		return buff;
	}

	static FrameKey* NewKey()
	{
		FrameKey* k = new FrameKey();

		k->_keyIndex = _globalKeyIndex++;

		return k;
	}
};

int FrameKey::_globalKeyIndex = 0;